package com.lanou.controller;/*
 * @author 马继耿~
 * @date 2023/10/30 15:24
 * @version 1.0
 * */

import com.lanou.pojo.PaymentPreEntity;
import com.lanou.service.MJG_AdvenceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.text.ParseException;

@Api(value = "预存款",tags = "预存款")
@RestController
@RequestMapping("/advence")
public class MJG_AdvenceController {
    @Autowired
    private MJG_AdvenceService mjg_advenceService;
    @ApiOperation(value = "预存款",httpMethod = "GET")
    @RequestMapping("/yucundeposit")
    public Object yucundeposit(String pageNum, String pageSize) throws IOException, ParseException {
       return mjg_advenceService.SelectYuCun(pageNum,pageSize);
    }

    @ApiOperation(value = "查询预存款",httpMethod = "GET")
    @RequestMapping("/select")
    public Object select(String resourceName,String feeUser,String type,String feeItemName,String payType) throws IOException, ParseException {
        return mjg_advenceService.SelectYuCun(resourceName,feeUser,type,feeItemName,payType);
    }
    @ApiOperation(value = "增加",httpMethod = "GET")
    @RequestMapping("/add")
    public void add(@RequestBody PaymentPreEntity paymentPreEntity) throws IOException, ParseException {
         mjg_advenceService.add(paymentPreEntity);
    }
}
